// MenuBox.h: interface for the CMenuBox class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MENUBOX_H__684A3B82_0D3A_4204_8E1B_DA16B2AFC726__INCLUDED_)
#define AFX_MENUBOX_H__684A3B82_0D3A_4204_8E1B_DA16B2AFC726__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "xD3D.h"
#include "xTexture.h"
#include "D3DSprite.h"
#include "D3DPlane.h"
#include "PlaneButton.h"

class CMenuBtn
{
public:
	int CmndID;
	int BtnKind;

	BOOL bEnable;
	BOOL bClick;
	BOOL bOver;
	BOOL bChecked;

	int Xp, Yp;
	int Width, Height;

	CD3DPlane *pPlane;
	int CheckSpn1;
	int CheckSpn2;
	int OffX, OffY;

	CMenuBtn()
	{
		Reset();
	}

	void Reset();

	int ProcessButton(POINT mp, BOOL bPress, BOOL bFirstPress);
	void Draw();
};

class CMenuBox  
{
public:
	BOOL bShow;
	BOOL bNowDraw;
	int Xp, Yp, Width, Height;
	int FrameCnt;
	int NoActiveCnt;
	BOOL bClick;

	CMenuBtn HelpBtn;
	CMenuBtn MusicBtn;
	CMenuBtn EffectBtn;
	CMenuBtn ScreenBtn;
	CMenuBtn ZoomBtn;
	CMenuBtn ExitBtn;
	
	CMenuBox();
	virtual ~CMenuBox();

	BOOL Init();
	void Reset();

	void Show(BOOL bshow);
	void SetBtnPos();
	int  ProcessClick(POINT mp, BOOL bPress, BOOL bFirstPress);
	void Process();
	void Draw();
};

#endif // !defined(AFX_MENUBOX_H__684A3B82_0D3A_4204_8E1B_DA16B2AFC726__INCLUDED_)
